//
//  DecorationLayer.h
//  DoutCakeMaker
//
//  Created by luotianqiang1 on 16/8/8.
//
//

#ifndef DecorationLayer_h
#define DecorationLayer_h

#include "BaseDecorationLayer.h"
#include "CheckBoxListView.h"
#include "AddSprinkle.h"
class DecorationLayer: public BaseDecorationLayer {
public:
    CREATE_SECENE(DecorationLayer);
protected:
    DecorationLayer();
    bool init();
    virtual void touchEnd(ui::Widget* widget);
    virtual void onEnter();
    virtual void onEnterTransitionDidFinish();
    virtual void onExitTransitionDidStart();
    void freeClick(KDS::EventSprite*,size_t,KDS::MyScollView*);
    void select(ui::CheckBox*,size_t index);
    void unSelect(ui::CheckBox*,size_t index);
protected:
    void reset();
    void playVoice();
    virtual KDS::MyBaseAdapter* createAdapter(const string& _currentcategory);
    void addParicle(const Vec2&);
    void showTouchPrompt();
    void stopPrompt();
protected:
    bool isFirst;
    int voiceSound;
    Node* eatContainer;
    CheckBoxListView listView;
    AddSprinkle* currentSprinkle;
    Node*eatClippinNode;
};

#endif /* DecorationLayer_h */
